package com.example.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.example.mapper.InterviewMapper;
import com.example.dto.interview;
import com.example.service.InterviewService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class InterviewServiceImpl implements InterviewService {

    @Autowired
    private InterviewMapper interviewMapper;

    //分页获取招聘会信息
    @Override
    public IPage<interview> AllList(Page<interview> interviewPage){
        return interviewMapper.AllList(interviewPage);
    }

    //公司名称查询
    @Override
    public IPage<interview> findByName(Page<interview> interviewPage,String key){
        return interviewMapper.findByName(interviewPage,key);
    }

    //工作岗位查询
    @Override
    public IPage<interview> findByPosition(Page<interview> interviewPage,String key){
        return interviewMapper.findByPosition(interviewPage,key);
    }

    //删除招聘信息
    @Override
    public void delete(String name,Integer id){
        interviewMapper.delete(name,id);
    }

    //修改employer表
    @Override
    public void editEmploy(interview i){
        interviewMapper.editEmploy(i);
    }

    //修改position表
    @Override
    public void editPosition(interview i){
        interviewMapper.editPosition(i);
    }
}
